<template>
	<view class="detail">
		<view class="bg-white mb-20">
			<view class="">
				<video class="video w-100" id="myVideo"
					src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
					@error="videoErrorCallback"></video>
			</view>
			<view class="btn p-20">
				<uv-row gutter="10">
					<uv-col span="6">
						<uv-button @click="lastBtn">免费试看</uv-button>
					</uv-col>
					<uv-col span="6">
						<uv-button type="error" @click="nextBtn">原价：{{ 20 }}元</uv-button>
					</uv-col>
				</uv-row>
			</view>
		</view>
		<view>
			<PsyTabs :tabs="courseTabs" @change="courseTabsChange" backgroundColor="#fff">
				<view v-show="courseTabsIndex == 0" class="text-secondary">
					婴儿异常行为管理系列（0~1岁）
				</view>
				<view v-show="courseTabsIndex == 1" class="text-secondary">
					暂无数据
					<!-- <PsyVideoItem width="49%" /> -->
				</view>
			</PsyTabs>
		</view>
	</view>
</template>

<script>
	import {
		requireEnums
	} from '../detail'
	import topTitle from '@/components/common/title.vue'

	export default {
		components: {
			topTitle
		},
		data() {
			return {
				courseTabs: requireEnums.courseTabs,
				courseTabsIndex: 0,
			}
		},
		computed: {},
		methods: {
			courseTabsChange(index) {
				this.courseTabsIndex = index
			},
		},
		watch: {},

		// 页面周期函数--监听页面加载
		onLoad() {},
		// 页面周期函数--监听页面初次渲染完成
		onReady() {},
		// 页面周期函数--监听页面显示(not-nvue)
		onShow() {},
		// 页面周期函数--监听页面隐藏
		onHide() {},
		// 页面周期函数--监听页面卸载
		onUnload() {},
		// 页面处理函数--监听用户下拉动作
		// onPullDownRefresh() { uni.stopPullDownRefresh(); },
		// 页面处理函数--监听用户上拉触底
		// onReachBottom() {},
		// 页面处理函数--监听页面滚动(not-nvue)
		// onPageScroll(event) {},
		// 页面处理函数--用户点击右上角分享
		// onShareAppMessage(options) {},
	}
</script>

<style scoped lang="less">
	.video {
		height: 500rpx;
	}

	.h-100 {
		height: 100%;
	}
</style>